package com.shop.cereshop.agent.service.agreement.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shop.cereshop.commons.domain.agreement.Agreement;
import com.shop.cereshop.agent.dao.agreement.CereAgreementDAO;
import com.shop.cereshop.agent.service.agreement.AgentAgreementService;
import org.springframework.stereotype.Service;

/**
 * @author lx
 * @version 1.0
 * @description: TODO
 * @date 2025/10/17 10:26
 */
@Service
public class AgentAgreementServiceImpl extends ServiceImpl<CereAgreementDAO, Agreement> implements AgentAgreementService {

    @Override
    public Agreement getByType(String typeCode, String version) {
        //根据协议类型编号以及协议版本获取协议
        return query()
                .eq("version", version)
                .eq("type_code", typeCode)
                .one();
    }
}
